# -*- coding: utf-8 -*-

import sys
from Tool import usefulTools
from Public import BasePage
userfulTools_instances = usefulTools.userfulToolsFactory()

# 数据库配置
# dbTypeName 数据库类型 oracle | mysql
# stat_conn 统计库连接配置
# stat_db_name 统计库名称
# biz_conn 业务库连接配置
# biz_db_name 业务库名称
#=============================mysql=======================
dbTypeName = "mysql"
stat_conn = {
    "host": "123.57.173.230",
    "port": 3306,
    "db": "cgdbstat",
    "user": "root",
    "password": "egova",
    "charset": "utf8"
}
stat_db_name = "cgdbstat"
biz_conn = {
    "host": "123.57.173.230",
    "port": 3306,
    "db": "cgdb",
    "user": "root",
    "password": "egova",
    "charset": "utf8"
}
biz_db_name = "cgdb"

#================================Oracle========================
# dbTypeName = "oracle"
# stat_conn = {
#     "host": "192.168.101.14",
#     "port": 1521,
#     "db": "cgdbstat0501",
#     "user": "umstat",
#     "password": "umstat",
#     "charset": "utf8"
# }
# stat_db_name = "cgdbstat0501"
# biz_conn = {
#     "host": "192.168.101.14",
#     "port": 1521,
#     "db": "cgdb0501",
#     "user": "dlsys",
#     "password": "dlsys",
#     "charset": "utf8"
# }
# biz_db_name = "cgdb0501"
# ================================================================
#系统基础数据
# server_url = "http://192.168.101.14:8080/eUrbanMIS"
server_url = "http://123.57.173.230:8081/eUrbanMIS"



# 监督员上报问题来源标识
base_dir = sys.path[0]
relative_address = userfulTools_instances.creat_dir(base_dir + '/Result/')
pic_file_path = base_dir + '/Result/' + relative_address
update_pic_file = userfulTools_instances.update_file_path_deal(base_dir + '/updatefile/9.jpg')
update_word_file = userfulTools_instances.update_file_path_deal(base_dir + '/updatefile/1.docx')
test_case_file = base_dir + '/Data/' + 'TestCaesData-mysql.xlsx'

# 获取手机分辨率
width = BasePage.Base.driver.get_window_size()['width']
height = BasePage.Base.driver.get_window_size()['height']